<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

require dirname(__FILE__).'/pc_controller.php';

class History extends PC_controller {

    public function __construct(){
        parent::__construct();
        $this->load->model('Customermodel','m_customer',true);
    }

    public function index(){
        $data = parent::index();

        $data['attr'] = array();

        $this->load->view('admin/history',$data);
    }

    public function getHistoryList(){
        $assist['where'] = getFilter($this->input->post(),Customermodel::$searchField);
        $assist['like'] = getFilter($this->input->post(),Customermodel::$likeField);
        $assist['sort'] = getSort($this->input->post(),Customermodel::$sortField);
        $assist['pagination'] = getPagination($this->input->post());

        $assist['join_customer'] = true;
        $assist['join_user'] = true;

        list($list,$count) = $this->m_customer->getHistoryListSection($assist);

        $this->response->setSuccess();
        $this->response->setItems($list);
        $this->response->setTotalCount($count);
        $this->response->responseExit();
    }
}
/* End of file api_log.php */
/* Location: ./application/controllers/api_log.php */
